<div id="demographicInfoDiv">
    <h3><a style='background-color: #EEE;' href="#"><span style="text-transform: uppercase; font-weight: bold;">{translate}Details of patient's demographics{/translate}</span></a></h3>
    <div>
	    <table cellspacing='0' cellpadding='0' class='grid' style='width: 100%'>
			<tr>
				<td class="form_label">{translate}Date of birth/Age{/translate}</td>
				<td class="form_input">
					<input name="person[DOB_{$datePart_0}]" id="DOB_{$datePart_0}" type="text" value="{$birthDays.0}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'DOB_{$datePart_1}')">
					<span class="label">-</span>
					<input name="person[DOB_{$datePart_1}]" id="DOB_{$datePart_1}" type="text" value="{$birthDays.1}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'DOB_yyyy')">
					<span class="label">-</span>
					<input name="person[DOB_{$datePart_2}]" id="DOB_yyyy" type="text" value="{$birthDays.2}" style="width: 40px;" onkeyup="return autoTab(this, 4, 'personAgeTxt')">
					<span class="label">/</span>
					<input name="personAgeTxt" id="personAgeTxt" type="text" value="{$person->getAge()}" style="width: 20px;"/>
			        <span class="label" style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2})</span>
			   </td>
			   <td class="form_label">{translate}Nationality{/translate}</td>
			   <td class="form_input" colspan="2">
			        <select name="person[nationality]" id="nationalityLbx" style="width: 145px;">
			            {html_options options=$countryList selected=$nationality}
			        </select>
			   </td>
			</tr>
			<tr>
				<td class="form_label">{translate}Address{/translate}</td>
				<td class="form_input" colspan="4">
				    <input name="address[street]" id='adrStreetTxt' type="text" value="{$person->getStreet()}" style="width: 200px;"/>
				    <select name="address[province_id]" id="provinceLbx" style="width: 145px;">
			            <option value="0" label="- {translate}Province/City{/translate} -">- {translate}Province/City{/translate} -</option>
			            {html_options options=$provinceList selected=$province}
			        </select>
			        <select name="address[district_id]" id="districtLbx" style="width: 145px;">
			                      <option value="0" label="- {translate}District{/translate} -">- {translate}District{/translate} -</option>
			            {html_options options=$districtList selected=$district}
			        </select><!-- 
			         <select name="address[ward_name]" id="wardNameTxt" style="width: 145px;">
			         	<option value='0' label='- {translate}Ward{/translate} -'>- {translate}Ward{/translate} -</option>
			         </select>-->&nbsp;&nbsp;
					<span class="label">{translate}Ward{/translate}</span>
					<input type="text" id="wardNameTxt" name="address[ward_name]" style="width: 140px;" value="{$person->getWardName()}"/>            
				</td>
			</tr>
			<tr>
			    <td class="form_label">{translate}Phone number{/translate}</td>
			    <td class="form_input">
			        <input name="person[phone_number]" id="personPhoneNumberTxt" type="text" value="" style="width: 140px;"/>
			    </td>
			    <td class="form_label">Email</td>
			    <td class="form_input" colspan="2">
			        <input name="person[email]" id="personEmailTxt" type="text" value="" style="width: 140px;"/>
			    </td>   
			</tr>
			<tr>
			    <td class="form_label">{translate}Career{/translate}</td>
			    <td class="form_input">
			        <select name="person[career_id]" id="careerId" style="width: 145px;">
			            <option value="-1" selected="selected">- - -</option>
			            {html_options options=$careerList selected=$person->getCareer()}
			        </select>
			    </td>  
			    <td class="form_label">{translate}Working place{/translate}</td>
			    <td class="form_input" colspan='2'>
			        <select name="person[workingplace_province_id]" id="workingProvinceLbx" style="width: 145px;">
			            <option value="0" label="- {translate}Province/City{/translate} -">- {translate}Province/City{/translate} -</option>
			            {html_options options=$provinceList selected=$person->getWorkingProvinceId()}
			        </select> 
			        <select name="person[workingplace_district_id]" id="workingDistrictLbx" style="width: 145px;">
			            <option value="0" label="- {translate}District{/translate} -">- {translate}District{/translate} -</option>
			            {html_options options=$wokingDistrictList selected=$person->getWorkingDistrictId()};
			        </select>
			    </td>
			</tr>
	        <tr>
	            <td colspan="5"><span style="text-transform: uppercase; font-weight: bold;">{translate}Insurance and relative information{/translate}</span>
			</tr>
			<tr>
				<td class="form_label">{translate}Medicial insurance number (if have){/translate}</td>
				<td class="form_input">
				    <input id="insuranceCodeTxt" name="insurance[insurance_code]" type="text" value="{$insurance->getInsuranceCode()}" style="width: 140px;"/> 
				</td>
				<td class="form_label">{translate}Insurance type{/translate}</td>
				<td class="form_input" colspan="2">
					<select name="insurance[insurance_type]" id="insuranceTypeLbx" style="width: 145px;">
					    <option>- {translate}Type{/translate} -</option>
					    {if ($insurance->getInsuranceTypeText()=='required')}
					    <option value="required" selected="selected">{translate}Required{/translate}</option>
					    <option value="volunteered">{translate}Volunteered{/translate}</option>
					    {elseif ($insurance->getInsuranceTypeText()=='volunteered')}
					    <option value="required">{translate}Required{/translate}</option>
					    <option value="volunteered" selected="selected">{translate}Volunteered{/translate}</option>
					    {else}
					    <option value="required">{translate}Required{/translate}</option>
					    <option value="volunteered">{translate}Volunteered{/translate}</option>
					    {/if}
					</select>
				</td> 
			</tr>
			<tr>
				<td class="form_label">{translate}Termination date{/translate}</td>
				<td class="form_input">			                                            
				    <input name="insurance[expired_{$datePart_0}]" id="expired_{$datePart_0}" type="text" value="{$terminationDates.0}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'expired_{$datePart_1}')">
				    <span class="label">-</span>
				    <input name="insurance[expired_{$datePart_1}]" id="expired_{$datePart_1}" type="text" value="{$terminationDates.1}" style="width: 21px;" onkeyup="return autoTab(this, 2, 'expired_{$datePart_2}')">
				    <span class="label">-</span>
				    <input name="insurance[expired_{$datePart_2}]" id="expired_{$datePart_2}" type="text" value="{$terminationDates.2}" style="width: 40px;">
				    <br/>
				    <span class="label" style="width: 21px; color: #AAA;">({$datePart_0}-{$datePart_1}-{$datePart_2})</span>
				</td>
				<td class="form_label">{translate}Place of registered examination{/translate}&nbsp;&nbsp;</td>
				<td class="form_input" colspan="2"><input type="text" name="registeredHospitalTxt" id="registeredHospitalTxt" value="{$insurance->getRegisteredHospitalName()}" style="width: 100%;padding: 2px 0px;"></td>
			</tr>
			<tr>
				<td class="form_label"><i>{translate}Relative name{/translate}&nbsp;&nbsp;</i></td>
				<td class="form_input"><input id="patientRelativeNameTxt" name="patient[relative_name]" type="text" value="{$patient->getRelativeName()}" style="width: 140px;"/></td>
				<td class="form_label"><i>{translate}Phone number{/translate}</i></td>
				<td class="form_input" colspan="2">
				    <input id="patientRelativeNumberTxt" name="patient[relative_number]" type="text" value="{$patient->getRelativeNumber()}" style="width: 140px;"/>
				</td>
			</tr>
			<tr>
				<td class="form_label"><i>{translate}Address{/translate}</i></td>
				<td class="form_input" colspan="3">
				    <input id="patientRelativeAddress" name="patient[relative_address]" type="text" value="{$patient->getRelativeAddress}" style="width: 100%;padding: 2px 0px;"/>
				</td>
				<td class="form_input">&nbsp;</td>
			</tr>   
	    </table>
    </div>
</div>